# load all packages for the reproduction scripts

# load  packages
library(tidyverse)
library(fixest)
library(texreg)
library(lmtest)
library(sandwich)
library(sjPlot)
library(fect)
library(broom)
library(countrycode)
library(Hmisc)
library(lubridate)
library(ggpubr)
library(modelsummary)
library(ggsignif)   
library(vcd)
library(gridExtra)
library(rworldmap)
library(marginaleffects)
library(coxed)
library(survival)
library(survminer)

# Here is the output for sessionInfo()

# R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
# Copyright (C) 2021 The R Foundation for Statistical Computing
# Platform: x86_64-apple-darwin17.0 (64-bit)
# 
# R is free software and comes with ABSOLUTELY NO WARRANTY.
# You are welcome to redistribute it under certain conditions.
# Type 'license()' or 'licence()' for distribution details.
# 
# Natural language support but running in an English locale
# 
# R is a collaborative project with many contributors.
# Type 'contributors()' for more information and
# 'citation()' on how to cite R or R packages in publications.
# 
# Type 'demo()' for some demos, 'help()' for on-line help, or
# 'help.start()' for an HTML browser interface to help.
# Type 'q()' to quit R.
# 
# > # load  packages
#   > library(tidyverse)
# ── Attaching packages ────────────────────────────────────────────────── tidyverse 1.3.1 ──
# ✔ ggplot2 3.3.6     ✔ purrr   0.3.4
# ✔ tibble  3.1.7     ✔ dplyr   1.0.9
# ✔ tidyr   1.2.0     ✔ stringr 1.4.0
# ✔ readr   2.1.2     ✔ forcats 0.5.1
# ── Conflicts ───────────────────────────────────────────────────── tidyverse_conflicts() ──
# ✖ dplyr::filter() masks stats::filter()
# ✖ dplyr::lag()    masks stats::lag()
# Warning messages:
#   1: package ‘tidyr’ was built under R version 4.1.2 
# 2: package ‘readr’ was built under R version 4.1.2 
# 3: package ‘dplyr’ was built under R version 4.1.2 
# > library(fixest)
# Warning message:
#   package ‘fixest’ was built under R version 4.1.3 
# > library(texreg)
# Version:  1.37.5
# Date:     2020-06-17
# Author:   Philip Leifeld (University of Essex)
# 
# Consider submitting praise using the praise or praise_interactive functions.
# Please cite the JSS article in your publications -- see citation("texreg").
# 
# Attaching package: ‘texreg’
# 
# The following object is masked from ‘package:tidyr’:
#   
#   extract
# 
# > library(lmtest)
# Loading required package: zoo
# 
# Attaching package: ‘zoo’
# 
# The following objects are masked from ‘package:base’:
#   
#   as.Date, as.Date.numeric
# 
# Warning messages:
#   1: package ‘lmtest’ was built under R version 4.1.2 
# 2: package ‘zoo’ was built under R version 4.1.2 
# > library(sandwich)
# > library(sjPlot)
# Registered S3 method overwritten by 'parameters':
#   method                         from      
# format.parameters_distribution datawizard
# Registered S3 methods overwritten by 'effectsize':
#   method              from      
# standardize.Surv    datawizard
# standardize.bcplm   datawizard
# standardize.clm2    datawizard
# standardize.default datawizard
# standardize.mediate datawizard
# standardize.wbgee   datawizard
# standardize.wbm     datawizard
# #refugeeswelcome
# > library(fect)
# Registered S3 method overwritten by 'GGally':
#   method from   
# +.gg   ggplot2
# > library(broom)
# Warning message:
#   package ‘broom’ was built under R version 4.1.2 
# > library(countrycode)
# Warning message:
#   package ‘countrycode’ was built under R version 4.1.2 
# > library(Hmisc)
# Loading required package: lattice
# Loading required package: survival
# Loading required package: Formula
# 
# Attaching package: ‘Hmisc’
# 
# The following objects are masked from ‘package:dplyr’:
#   
#   src, summarize
# 
# The following objects are masked from ‘package:base’:
#   
#   format.pval, units
# 
# Warning message:
#   package ‘Hmisc’ was built under R version 4.1.2 
# > library(lubridate)
# 
# Attaching package: ‘lubridate’
# 
# The following objects are masked from ‘package:base’:
#   
#   date, intersect, setdiff, union
# 
# > library(ggpubr)
# Registered S3 methods overwritten by 'car':
#   method                          from
# influence.merMod                lme4
# cooks.distance.influence.merMod lme4
# dfbeta.influence.merMod         lme4
# dfbetas.influence.merMod        lme4
# > library(modelsummary)
# 
# Attaching package: ‘modelsummary’
# 
# The following object is masked from ‘package:Hmisc’:
#   
#   Mean
# 
# > library(ggsignif)   
# > library(vcd)
# Loading required package: grid
# > library(gridExtra)
# 
# Attaching package: ‘gridExtra’
# 
# The following object is masked from ‘package:dplyr’:
#   
#   combine
# 
# > library(rworldmap)
# Loading required package: sp
# ### Welcome to rworldmap ###
# For a short introduction type : 	 vignette('rworldmap')
# > library(marginaleffects)
# Warning message:
#   package ‘marginaleffects’ was built under R version 4.1.2 
# > library(coxed)
# Loading required package: rms
# Loading required package: SparseM
# 
# Attaching package: ‘SparseM’
# 
# The following object is masked from ‘package:base’:
#   
#   backsolve
# 
# 
# Attaching package: ‘rms’
# 
# The following object is masked from ‘package:lmtest’:
#   
#   lrtest
# 
# Loading required package: mgcv
# Loading required package: nlme
# 
# Attaching package: ‘nlme’
# 
# The following object is masked from ‘package:dplyr’:
#   
#   collapse
# 
# This is mgcv 1.8-35. For overview type 'help("mgcv-package")'.
# Warning message:
#   package ‘rms’ was built under R version 4.1.2 
# > library(survival)
# > library(survminer)
# > sessionInfo()
# R version 4.1.0 (2021-05-18)
# Platform: x86_64-apple-darwin17.0 (64-bit)
# Running under: macOS Big Sur 11.6.8
# 
# Matrix products: default
# LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
# 
# locale:
#   [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
# 
# attached base packages:
#   [1] grid      stats     graphics  grDevices utils     datasets  methods   base     
# 
# other attached packages:
#   [1] survminer_0.4.9       coxed_0.3.3           mgcv_1.8-35          
# [4] nlme_3.1-152          rms_6.3-0             SparseM_1.81         
# [7] marginaleffects_0.6.0 rworldmap_1.3-6       sp_1.4-5             
# [10] gridExtra_2.3         vcd_1.4-8             ggsignif_0.6.1       
# [13] modelsummary_0.11.0   ggpubr_0.4.0          lubridate_1.8.0      
# [16] Hmisc_4.7-0           Formula_1.2-4         survival_3.2-11      
# [19] lattice_0.20-44       countrycode_1.4.0     broom_0.8.0          
# [22] fect_0.5.0            sjPlot_2.8.10         sandwich_3.0-1       
# [25] lmtest_0.9-40         zoo_1.8-10            texreg_1.37.5        
# [28] fixest_0.10.5         forcats_0.5.1         stringr_1.4.0        
# [31] dplyr_1.0.9           purrr_0.3.4           readr_2.1.2          
# [34] tidyr_1.2.0           tibble_3.1.7          ggplot2_3.3.6        
# [37] tidyverse_1.3.1      
# 
# loaded via a namespace (and not attached):
#   [1] spam_2.7-0          readxl_1.4.0        backports_1.4.1     plyr_1.8.7         
# [5] splines_4.1.0       listenv_0.8.0       TH.data_1.1-0       digest_0.6.29      
# [9] foreach_1.5.2       htmltools_0.5.2     viridis_0.6.1       fansi_1.0.3        
# [13] magrittr_2.0.3      checkmate_2.0.0     cluster_2.1.2       doParallel_1.0.17  
# [17] tzdb_0.3.0          openxlsx_4.2.3      globals_0.15.0      modelr_0.1.8       
# [21] matrixStats_0.59.0  jpeg_0.1-8.1        colorspace_2.0-3    rvest_1.0.2        
# [25] haven_2.5.0         xfun_0.30           crayon_1.5.1        jsonlite_1.8.0     
# [29] lme4_1.1-27         iterators_1.0.14    glue_1.6.2          gtable_0.3.0       
# [33] emmeans_1.6.1       MatrixModels_0.5-0  sjstats_0.18.1      sjmisc_2.8.7       
# [37] car_3.0-10          maps_3.4.0          abind_1.4-5         scales_1.2.0       
# [41] mvtnorm_1.1-3       DBI_1.1.2           GGally_2.1.2        rngtools_1.5.2     
# [45] rstatix_0.7.0       ggeffects_1.1.0     Rcpp_1.0.8.3        viridisLite_0.4.0  
# [49] xtable_1.8-4        performance_0.8.0   htmlTable_2.2.1     foreign_0.8-81     
# [53] km.ci_0.5-2         dotCall64_1.0-1     datawizard_0.4.1    htmlwidgets_1.5.3  
# [57] httr_1.4.3          RColorBrewer_1.1-3  ellipsis_0.3.2      pkgconfig_2.0.3    
# [61] reshape_0.8.9       nnet_7.3-16         dbplyr_2.1.1        utf8_1.2.2         
# [65] tidyselect_1.1.2    rlang_1.0.2         effectsize_0.5.0.2  munsell_0.5.0      
# [69] cellranger_1.1.0    tools_4.1.0         cli_3.3.0           generics_0.1.2     
# [73] sjlabelled_1.1.8    fastmap_1.1.0       tables_0.9.6        knitr_1.38         
# [77] fs_1.5.2            zip_2.2.0           survMisc_0.5.5      future_1.26.1      
# [81] doRNG_1.8.2         quantreg_5.85       xml2_1.3.3          compiler_4.1.0     
# [85] rstudioapi_0.13     curl_4.3.2          png_0.1-7           reprex_2.0.1       
# [89] stringi_1.7.6       parameters_0.16.0.1 fields_12.5         Matrix_1.3-3       
# [93] nloptr_1.2.2.2      KMsurv_0.1-5        vctrs_0.4.1         pillar_1.7.0       
# [97] lifecycle_1.0.1     estimability_1.3    conquer_1.0.2       maptools_1.1-1     
# [101] data.table_1.14.2   insight_0.17.1      R6_2.5.1            latticeExtra_0.6-29
# [105] rio_0.5.26          parallelly_1.31.1   fastplm_1.0.9       codetools_0.2-18   
# [109] polspline_1.1.20    boot_1.3-28         MASS_7.3-54         assertthat_0.2.1   
# [113] withr_2.5.0         multcomp_1.4-17     bayestestR_0.11.5.1 parallel_4.1.0     
# [117] hms_1.1.1           dreamerr_1.2.3      rpart_4.1-15        coda_0.19-4        
# [121] minqa_1.2.4         carData_3.0-4       numDeriv_2016.8-1.1 base64enc_0.1-3  